<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page language="java" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link href="css/demo.css" rel="stylesheet" type="text/css" />
<script type="text/javaScript">
	function test() {
		var val = document.getElementsByTagName("input");
		for (var i = 0; i < val.length; i++) {
			if (val[i].type == 'radio') {
				var ex = document.getElementsByName(val[i].name);
				var j = 0;
				for (var a = 0; a < ex.length; a++) {
					if (ex.item(a).checked) {
						j++;
					}
				}
				if (j == 0) {
					alert("还有问题没有选泽！");
					return false;
				}
			}
		}
		alert("提交成功！");
		return true;
	}
</script>
</head>
<body
	background="C:/Users/Administrator/workspace/demo20160711/WebContent/pic/5-13050GZ015.gif">
	<form action="ResultsServlet" method="post" onsubmit="return test()">
		欢迎 ${sessionScope.stu.stuRealName}
		<table border="0" cellpadding="30px" cellspacing="0px" width="100%">
			<tr height="200px">
				<td colspan="3" align="center"><img
					src="C:/Users/Administrator/workspace/demo20160711/WebContent/pic/a3cc7cd98d1001e9c7ad571eb00e7bec54e7970a.jpg"
					alt="Dory"></td>
			</tr>
			<tr height="800px">
				<b>
					<td width="20%" valign="top">
						<table align="center">
							<tr>
								<td>
									<div
										style="background-image: url(C:/Users/Administrator/workspace/demo20160711/WebContent/pic/u=4209667892,382162925&amp;fm=21&amp;gp=0.jpg); width: 293px; height: 190px; padding-top: 30px; border-top-right-radius: 10px; border-top-left-radius: 10px; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px;">
										<p>&nbsp&nbsp${requestScope.pap.evaName}</p>
										<p>&nbsp&nbsp教师：${requestScope.pap.teacher.name}</p>
										<p>&nbsp&nbsp日期：${requestScope.pap.date}</p>
										<p>&nbsp&nbsp班级：${requestScope.pap.tClass.name}</p>
									</div>
								</td>
							</tr>
						</table>
				</td>
					<td valign="top">
						<table align="center">

							<tr>
								<td>
									<p>${requestScope.pap.examPaper.name}</p> <input type="hidden"
									name="stuId" value=${sessionScope.stu.stuId }> <input
									type="hidden" name="evaId" value=${requestScope.pap.evaId }>
								</td>
							</tr>
							<c:forEach var="list" items="${requestScope.pap.examPaper.list }"
								varStatus="i">
								<tr>
									<td>
										<p>${i.index+1}.${list.content}<br />
										<table>
											<c:forEach var="a" items="${list.list }">
												<tr>
													<td><input type="radio" name=${list.id }
														value=${a.a_id }>${a.content}</td>
												</tr>
											</c:forEach>
										</table>
										</p>
									</td>
								</tr>
							</c:forEach>
							<tr>
								<td><input type="submit" value="提交"
									style="width: 50px; height: 30px;"> <input type="reset"
									value="取消" style="width: 50px; height: 30px;"> <a
									href="main.html"><input type="button" value="返回"
										style="width: 50px; height: 30px;"></a></td>
							</tr>

						</table>
				</td>
				<td align="center" width="20%"><img
					src="C:/Users/Administrator/workspace/demo20160711/WebContent/pic/wsj2015-2.png"
					alt="Cat"></td>
				<b>
			</tr>
		</table>
	</form>
</body>
</html>